package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 当前搬运任务执行情况
 * </p>
 *
 * @author mt
 * @since 2022-01-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_car_task_execution_info")
public class CarTaskExecutionInfo extends Model<CarTaskExecutionInfo> {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 更新人id
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号 默认为 1
     */
    @TableField("version")
    @Version
    private String version;

    /**
     * 状态	0初始化，1损坏
     */
    @TableField("status")
    private Integer status;

    /**
     * 内部编码，系统自动生成
     */
    @TableField("inter_code")
    private String interCode;

    /**
     * 编码
     */
    @TableField("code")
    private String code;

    /**
     * 任务id
     */
    @TableField("task_id")
    private Long taskId;

    /**
     * 任务编码，任务编码规则：
     */
    @TableField("task_code")
    private String taskCode;

    /**
     * 工单id,通过工单查看工序流程
     */
    @TableField("word_order_id")
    private Long wordOrderId;

    /**
     * 子任务编码，任务编码规则：
     */
    @TableField("f_task_code")
    private String fTaskCode;

    /**
     * 绑定存储箱id，关联存储箱表：t_storage_box，第一任务箱编码，每个一箱加工片都有自己工序流程，并且记录标记工序流程，每箱更加工单从新标记工序流程
     */
    @TableField("f_storage_box_id")
    private Long fStorageBoxId;

    /**
     * 是否为空	0空箱，1有货
     */
    @TableField("is_empty")
    private Integer isEmpty;

    /**
     * 当前状态	0库存里，1搬运中，2完成
     */
    @TableField("curr_status")
    private Integer currStatus;

    /**
     * 当前库位id，关联库位表：t_location
     */
    @TableField("curr_location_id")
    private Long currLocationId;

    /**
     * 当前库位名称
     */
    @TableField("curr_location")
    private String currLocation;

    /**
     * 目标库位id，关联库位表：t_location
     */
    @TableField("target_location_id")
    private Long targetLocationId;

    /**
     * 目标库位名称
     */
    @TableField("target_location")
    private String targetLocation;

    /**
     * 当前工序
     */
    @TableField("f_curr_process_code")
    private String fCurrProcessCode;

    /**
     * 下一个工序，如果是货物有货存在下一个工序信息，如果空箱没有下一个工序
     */
    @TableField("f_next_process_code")
    private String fNextProcessCode;

    /**
     * 开始时间，车辆运输开始
     */
    @TableField("f_start_time")
    private LocalDateTime fStartTime;

    /**
     * 完成时间，车辆放好最为完成时间
     */
    @TableField("f_end_time")
    private LocalDateTime fEndTime;

    /**
     * 设备RGV id
     */
    @TableField("equipment_id")
    private Long equipmentId;

    /**
     * 货叉编码
     */
    @TableField("f_fork_code")
    private String fForkCode;

    /**
     * 子任务编码，任务编码规则：
     */
    @TableField("w_task_code")
    private String wTaskCode;

    /**
     * 绑定存储箱id，关联存储箱表：t_storage_box，第一任务箱编码，每个一箱加工片都有自己工序流程，并且记录标记工序流程，每箱更加工单从新标记工序流程
     */
    @TableField("w_storage_box_id")
    private Long wStorageBoxId;

    /**
     * 是否为空	0空箱，1有货
     */
    @TableField("w_is_empty")
    private Integer wIsEmpty;

    /**
     * 当前状态	0库存里，1搬运中，2完成
     */
    @TableField("w_curr_status")
    private Integer wCurrStatus;

    /**
     * 当前库位id，关联库位表：t_location
     */
    @TableField("w_curr_location_id")
    private Long wCurrLocationId;

    /**
     * 当前库位名称
     */
    @TableField("w_curr_location")
    private String wCurrLocation;

    /**
     * 目标库位id，关联库位表：t_location
     */
    @TableField("w_target_location_id")
    private Long wTargetLocationId;

    /**
     * 目标库位名称
     */
    @TableField("w_target_location")
    private String wTargetLocation;

    /**
     * 当前工序
     */
    @TableField("w_curr_process_code")
    private String wCurrProcessCode;

    /**
     * 下一个工序（重点），根据工单工序提前定位，如果是货物有货存在下一个工序信息，如果空箱没有下一个工序
     */
    @TableField("w_next_process_code")
    private String wNextProcessCode;

    /**
     * 开始时间，车辆运输开始
     */
    @TableField("w_start_time")
    private LocalDateTime wStartTime;

    /**
     * 完成时间，车辆运输运完成后的时间
     */
    @TableField("w_end_time")
    private LocalDateTime wEndTime;

    /**
     * 货叉编码
     */
    @TableField("w_fork_code")
    private String wForkCode;

    /**
     * 任务类型：0：出库   1：入库   2：流转   3：质量检测
     */
    @TableField("task_type")
    private Integer taskType;

    /**
     * 任务来源
     */
    @TableField("task_source")
    private Integer taskSource;


    public static final String ID = "id";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATOR_ID = "creator_id";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String STATUS = "status";

    public static final String INTER_CODE = "inter_code";

    public static final String CODE = "code";

    public static final String TASK_ID = "task_id";

    public static final String TASK_CODE = "task_code";

    public static final String WORD_ORDER_ID = "word_order_id";

    public static final String F_TASK_CODE = "f_task_code";

    public static final String F_STORAGE_BOX_ID = "f_storage_box_id";

    public static final String IS_EMPTY = "is_empty";

    public static final String CURR_STATUS = "curr_status";

    public static final String CURR_LOCATION_ID = "curr_location_id";

    public static final String CURR_LOCATION = "curr_location";

    public static final String TARGET_LOCATION_ID = "target_location_id";

    public static final String TARGET_LOCATION = "target_location";

    public static final String F_CURR_PROCESS_CODE = "f_curr_process_code";

    public static final String F_NEXT_PROCESS_CODE = "f_next_process_code";

    public static final String F_START_TIME = "f_start_time";

    public static final String F_END_TIME = "f_end_time";

    public static final String EQUIPMENT_ID = "equipment_id";

    public static final String F_FORK_CODE = "f_fork_code";

    public static final String W_TASK_CODE = "w_task_code";

    public static final String W_STORAGE_BOX_ID = "w_storage_box_id";

    public static final String W_IS_EMPTY = "w_is_empty";

    public static final String W_CURR_STATUS = "w_curr_status";

    public static final String W_CURR_LOCATION_ID = "w_curr_location_id";

    public static final String W_CURR_LOCATION = "w_curr_location";

    public static final String W_TARGET_LOCATION_ID = "w_target_location_id";

    public static final String W_TARGET_LOCATION = "w_target_location";

    public static final String W_CURR_PROCESS_CODE = "w_curr_process_code";

    public static final String W_NEXT_PROCESS_CODE = "w_next_process_code";

    public static final String W_START_TIME = "w_start_time";

    public static final String W_END_TIME = "w_end_time";

    public static final String W_FORK_CODE = "w_fork_code";

    public static final String TASK_TYPE = "task_type";

    public static final String TASK_SOURCE = "task_source";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
